<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CourseSection extends Model
{
    use SoftDeletes;
    protected $table = 'course_section';

    public function course(){
        return $this->hasMany('App\Models\Course','course_class_section_id','id');
    }

    public function getCourseNum(){
        return Course::where('course_class_section_id',$this->id)->count();
    }
}

